package org.mikeliu.review.exp2;

import java.util.Scanner;

class Teacher
{
	private int no;
	private String name;
	private int age;
	private String seminary;
	
	public Teacher(int no, String name, int age, String seminary) {
		super();
		this.no = no;
		this.name = name;
		this.age = age;
		this.seminary = seminary;
	}
	public int getNo() 
	{
		return no;
	}
	public void setNo(int no)
	{
		this.no = no;
	}
	public String getName() 
	{
		return name;
	}
	public void setName(String name) 
	{
		this.name = name;
	}
	public int getAge()
	{
		return age;
	}
	public void setAge(int age)
	{
		this.age = age;
	}
	public String getSeminary()
	{
		return seminary;
	}
	public void setSeminary(String seminary) 
	{
		this.seminary = seminary;
	}
	@Override
	public boolean equals(Object teacher)
	{
		if(!(teacher instanceof Teacher))
		{
			return false;
		}
		else 
		{
			if(((Teacher)teacher).no==this.no)return true;
			else return false;
		}
	}
	@Override
	public String toString()
	{
		return "no: "+this.no+", name:"+this.name+", age: "+this.age+", seminary: "+this.seminary;
	}
}

public class Main 
{
	public static void main(String[] args) 
	{
		Scanner scanner=new Scanner(System.in);
		Teacher teacher1=new Teacher(scanner.nextInt(),scanner.next(),scanner.nextInt(),scanner.next());
		Teacher teacher2=new Teacher(scanner.nextInt(),scanner.next(),scanner.nextInt(),scanner.next());
		System.out.println(teacher1);
		System.out.println(teacher2);
		System.out.println(teacher1.equals(teacher2));
		scanner.close();
	}
}
